import '@/assets/index.scss';

import {} from '@/components';

export interface ProjectProps {
    children?: string | React.ReactElement | React.ReactElement[];
}

function Project({ children }: ProjectProps) {
    console.log(time().format('{YYYY} HH:mm:ss'), `NAME render`);

    const { pathname } = useLocation();
    const [show, set_show] = useState(true);
    useEffect(() => {
        set_show(
            [
                '/home',
                // '/post',
                '/space',
                '/space/like',
                '/space/question',
                '/space/comments',
            ].includes(pathname),
        );
    }, [pathname]);
    return (
        <>
            <div style={{ display: show ? '' : 'none' }}>
                <nav className='nav-div'>
                    <NavLink to='home'>主页</NavLink>
                    <NavLink to='post'>动态</NavLink>
                    {/* <NavLink to='test'>消息</NavLink> */}
                    <NavLink to='space'>我的</NavLink>
                </nav>
            </div>
        </>
    );
}

export default Project;
